package com.example.bean;

import lombok.Data;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnNotWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.context.annotation.Conditional;
import org.springframework.stereotype.Component;

@Component("tom")
@Data
@ConditionalOnBean(name="jerry")
//@ConditionalOnWebApplication
@ConditionalOnNotWebApplication
public class Cat {
    private String name;
    private Integer age;
}
